package com.indusfo.spc.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.indusfo.spc.common.pojo.BasePojo;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * sop设备资料表
 *  
 * @author XIET
 * 
 * @Version 修改时间:2018年12月3日,上午10:24:34
 */

@Table(name="dv_device")
public class Device extends BasePojo {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1345878012007492177L;
	@Id
	@Column(name="device_id", insertable = false)
	//设备id
    private Integer deviceId;
    //设备编号
    private String deviceCode;
    //设备名称
    private String deviceName;

    //mac地址
    private String macIp;

    //类型
    private Integer deviceTypeId;
    private String deviceTypeName;

    //产线
    private Integer productlineId;
    //产线名称
    private String productlineName;
    //产线编码
    private String productlineCode;

    //车间ID
    private Integer workshopId;
    //车间名称
    private String workshopName;

    //工位
    private Integer stationId;
    //工位编码
    private String  stationCode;
    //工位名称
    private String stationName;

    //说明   vcRemark
    private String remark;

    //数据状态
    private int dataState;
    // 状态名称
    private String dataStateName ;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyDate;

    // 报废时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String scrapDate;

    // 保养时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String maintainDate;

    // 下次保养时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String nmaintainDate;

    // 保养周期
    private Integer maintainPeriod;

    //设备状态(1在库  2使用中  3维修中  4报废  5其他)
    private Integer deviceStateId;
    //设备状态名称
    private String deviceStateName;

    //图片真实路径
    private String relUrl;
    //文件名
    private String content;
    //标准能耗
    private String normEnergy;
    //单件能耗
    private String oneEnergy;

    public Device(String deviceCode, String deviceName, String macIp, String deviceTypeName, String productlineName, String stationName,Integer maintainPeriod) {
        this.deviceCode = deviceCode;
        this.deviceName = deviceName;
        this.macIp = macIp;
        this.deviceTypeName = deviceTypeName;
        this.productlineName = productlineName;
        this.stationName = stationName;
        this.maintainPeriod=maintainPeriod;
    }

    public Device() {
    }



    public Integer getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Integer deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode== null ? null : deviceCode.trim().replace(" ","");
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName== null ? null : deviceName.trim().replace(" ","");
    }

    public String getMacIp() {
        return macIp;
    }

    public void setMacIp(String macIp) {
        this.macIp = macIp== null ? null : macIp.trim().replace(" ","");
    }

    public Integer getDeviceTypeId() {
        return deviceTypeId;
    }

    public void setDeviceTypeId(Integer deviceTypeId) {
        this.deviceTypeId = deviceTypeId;
    }

    public String getDeviceTypeName() {
        return deviceTypeName;
    }

    public void setDeviceTypeName(String deviceTypeName) {
        this.deviceTypeName = deviceTypeName;
    }

    public Integer getProductlineId() {
        return productlineId;
    }

    public void setProductlineId(Integer productlineId) {
        this.productlineId = productlineId;
    }

    public String getProductlineName() {
        return productlineName;
    }

    public void setProductlineName(String productlineName) {
        this.productlineName = productlineName;
    }

    public String getProductlineCode() {
        return productlineCode;
    }

    public void setProductlineCode(String productlineCode) {
        this.productlineCode = productlineCode;
    }

    public Integer getWorkshopId() {
        return workshopId;
    }

    public void setWorkshopId(Integer workshopId) {
        this.workshopId = workshopId;
    }

    public String getWorkshopName() {
        return workshopName;
    }

    public void setWorkshopName(String workshopName) {
        this.workshopName = workshopName;
    }

    public Integer getStationId() {
        return stationId;
    }

    public void setStationId(Integer stationId) {
        this.stationId = stationId;
    }

    public String getStationCode() {
        return stationCode;
    }

    public void setStationCode(String stationCode) {
        this.stationCode = stationCode;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark== null ? null : remark.trim().replace(" ","");
    }

    public int getDataState() {
        return dataState;
    }

    public void setDataState(int dataState) {
        this.dataState = dataState;
    }

    public String getDataStateName() {
        return dataStateName;
    }

    public void setDataStateName(String dataStateName) {
        this.dataStateName = dataStateName;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public String getScrapDate() {
        return scrapDate;
    }

    public void setScrapDate(String scrapDate) {
        this.scrapDate = scrapDate;
    }

    public String getMaintainDate() {
        return maintainDate;
    }

    public void setMaintainDate(String maintainDate) {
        this.maintainDate = maintainDate;
    }

    public String getNmaintainDate() {
        return nmaintainDate;
    }

    public void setNmaintainDate(String nmaintainDate) {
        this.nmaintainDate = nmaintainDate;
    }

    public Integer getMaintainPeriod() {
        return maintainPeriod;
    }

    public void setMaintainPeriod(Integer maintainPeriod) {
        this.maintainPeriod = maintainPeriod;
    }

    public Integer getDeviceStateId() {
        return deviceStateId;
    }

    public void setDeviceStateId(Integer deviceStateId) {
        this.deviceStateId = deviceStateId;
    }

    public String getDeviceStateName() {
        return deviceStateName;
    }

    public void setDeviceStateName(String deviceStateName) {
        this.deviceStateName = deviceStateName;
    }

    public String getRelUrl() {
        return relUrl;
    }

    public void setRelUrl(String relUrl) {
        this.relUrl = relUrl== null ? null : relUrl.trim().replace(" ","");
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content== null ? null : content.trim().replace(" ","");
    }

    public String getNormEnergy() {
        return normEnergy;
    }

    public void setNormEnergy(String normEnergy) {
        this.normEnergy = normEnergy== null ? null : normEnergy.trim().replace(" ","");
    }

    public String getOneEnergy() {
        return oneEnergy;
    }

    public void setOneEnergy(String oneEnergy) {
        this.oneEnergy = oneEnergy== null ? null : oneEnergy.trim().replace(" ","");
    }
}